package org.anti996.ln_mybatis.mapper;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;


@Slf4j
@Component
public class AccountMetaObjectHandler implements MetaObjectHandler {

    @Override
    public void insertFill(MetaObject metaObject) {
        log.info("测试自动填充-insert……");
        this.strictInsertFill(metaObject, "hometown", String.class, "中国");
    }

    @Override
    public void updateFill(MetaObject metaObject) {
        log.info("测试自动填充-update……什么也不做，就是玩儿");
    }
}
